<template>
  <div>
  <div class="conferenceOpenVideo">
    <div class="conferenceVideoContainer">
      <!--视频头部-->
      <div class="conferenceVideoUp">
        <!--标题-->
        <template v-if="ConferenceInfo.type ==='Video'">
          <div class="conferenceVideoUp-title">视频会议:{{currentConferenceId}}</div>
        </template>
        <template v-if="ConferenceInfo.type ==='Voice'">
          <div class="conferenceVideoUp-title">语音会议:{{currentConferenceId}}</div>
        </template>
<!--        右上角测试宫格-->
<!--        <div @click="isActive = 2" style="display: inline-block">-->
<!--          <span style="cursor: pointer;border:1px solid red">222</span>-->
<!--        </div>-->
<!--        <div @click="isActive = 4" style="display: inline-block">-->
<!--          <span style="cursor: pointer;border:1px solid red">444</span>-->
<!--        </div>-->
<!--        <div @click="isActive = 6" style="display: inline-block">-->
<!--          <span style="cursor: pointer;border:1px solid red">666</span>-->
<!--        </div>-->
<!--        <div @click="isActive = 9" style="display: inline-block">-->
<!--          <span style="cursor: pointer;border:1px solid red">999</span>-->
<!--        </div>-->
<!--        TODO 测试暂时用  后续删除-->
<!--        <div style="display: inline-block" @click="testbutton1">-->
<!--          <span style="cursor: pointer;border:1px solid red">增加讲话人</span>-->
<!--        </div>-->
<!--        <div style="display: inline-block" @click="testbutton11">-->
<!--          <span style="cursor: pointer;border:1px solid red">增加讲话人1</span>-->
<!--        </div>-->
<!--        <div style="display: inline-block" @click="testbutton2">-->
<!--          <span style="cursor: pointer;border:1px solid red">减少讲话人</span>-->
<!--        </div>-->
<!--        <div style="display: inline-block" @click="testbutton21">-->
<!--          <span style="cursor: pointer;border:1px solid red">减少讲话人1</span>-->
<!--        </div>-->
        <!--左上角显示正在讲话的成员-->
        <div class="showTalkingNameDiv">
          <span>正在讲话：</span><span>{{isTalkingMemName}}</span>
        </div>
        <!--右上角关闭缩小窗口-->
        <div class="conferenceVideoUp-minimize" @click="minimize">
          <img class="videoRightCtlImg" src="@/assets/icons/conference/conferenceVideo/minimize.png" alt="">
        </div>
        <div class="conferenceVideoUp-close"  @click="closeConfrenceRoomVisible = true">
<!--          <img src="@/assets/icons/conference/conferenceVideo/shoutDown.png" alt="">-->
<!--          <img class="videoRightCtl" src="@/assets/icons/conference/conferenceVideo/shoutDown.png" alt="">-->
          <img class="videoRightCtlImg" src="@/assets/icons/conference/conferenceVideo/closeWin.png"
               alt="">
        </div>

      </div>
      <!--视频中部区域-->
      <div class="conferenceVideoCentre">
        <template v-if="ConferenceInfo.type ==='Video'">
          <div class="conferenceVideoCentreLeft" id="conferenceVideo_div">
            <div v-bind:class="[isActive == 2 ? 'quarter-div2': '',isActive == 4 ? 'quarter-div': '',isActive == 9 ? 'quarter-div4': '',isActive == 6 ? 'quarter-div6': '', 'yellow']" id="conferenceVideoDiv_0">
              <div v-if="VideoMemberArray[0].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[0].micStatus ==1">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[0].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[0].name">
                  {{VideoMemberArray[0].name}}
                </span>
              </div>
            </div>
            <div v-bind:class="[isActive == 2 ? 'quarter-div2': '',isActive == 4 ? 'quarter-div': '',isActive == 9 ? 'quarter-div4': '',isActive == 6 ? 'quarter-div6': '', 'yellow']" id="conferenceVideoDiv_1">
              <div v-if="VideoMemberArray[1].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[1].micStatus ==1">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[1].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[1].name">
                  {{VideoMemberArray[1].name}}
                </span>
              </div>
            </div>
            <div v-show="isActive == 4 || isActive == 6|| isActive == 9" v-bind:class="[isActive == 4 ? 'quarter-div': '',isActive == 9 ? 'quarter-div4': '',isActive == 6 ? 'quarter-div6':'']" id="conferenceVideoDiv_2">
              <div v-if="VideoMemberArray[2].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[2].micStatus ==1">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[2].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[2].name">
                  {{VideoMemberArray[2].name}}
                </span>
              </div>
            </div>
            <div v-show="isActive == 4 || isActive == 6|| isActive == 9" v-bind:class="[isActive == 4 ? 'quarter-div': '',isActive == 9 ? 'quarter-div4': '',isActive == 6 ? 'quarter-div6':'']" id="conferenceVideoDiv_3">
              <div v-if="VideoMemberArray[3].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[3].micStatus ==1">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[3].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[3].name">
                  {{VideoMemberArray[3].name}}
                </span>
              </div>
            </div>
            <div v-show="isActive == 9 || isActive == 6" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 6 ? 'quarter-div6':'']" id="conferenceVideoDiv_4">
              <div v-if="VideoMemberArray[4].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[4].micStatus ==1">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[4].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[4].name">
                  {{VideoMemberArray[4].name}}
                </span>
              </div>
            </div>
            <div v-show="isActive == 9 || isActive == 6" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 6 ? 'quarter-div6':'']" id="conferenceVideoDiv_5">
              <div v-if="VideoMemberArray[5].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[5].micStatus ==1">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[5].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[5].name">
                  {{VideoMemberArray[5].name}}
                </span>
              </div>
            </div>
            <div v-show="isActive == 9 || isActive == 16" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9':'']" id="conferenceVideoDiv_6">
              <div v-if="VideoMemberArray[6].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[6].micStatus ==1">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[6].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[6].name">
                  {{VideoMemberArray[6].name}}
                </span>
              </div>
            </div>
            <div v-show="isActive == 9 || isActive == 16" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9': '']" id="conferenceVideoDiv_7">
              <div v-if="VideoMemberArray[7].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[7].micStatus ==1">
                   <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[7].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[7].name">
                  {{VideoMemberArray[7].name}}
                </span>
              </div>
            </div>
            <div v-show="isActive == 9 || isActive == 16" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9': '']" id="conferenceVideoDiv_8">
              <div v-if="VideoMemberArray[8].isShow" class="VideoDiv_MemberInfo">
                <span class="MemberInfo_Img">
                  <template v-if="VideoMemberArray[8].micStatus ==1">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOff.png" alt="">
                  </template>
                  <template v-if="VideoMemberArray[8].micStatus ==0">
                    <img src="@/assets/icons/conference/conferenceVideo/MemDivMicOn.png" alt="">
                  </template>
                </span>
                <span class="MemberInfo_Name" :title="VideoMemberArray[8].name">
                  {{VideoMemberArray[8].name}}
                </span>
              </div>
            </div>
          </div>
        </template>
        <template v-if="ConferenceInfo.type ==='Voice'">
          <div class="conferenceVideoCentreLeft">
<!--            <div v-bind:class="[isActive == 4 ? 'quarter-div': '',isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9': '', 'yellow']" id="conferenceVideoDiv_0">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
<!--            <div v-bind:class="[isActive == 4 ? 'quarter-div': '',isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9': '', 'yellow']" id="conferenceVideoDiv_1">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
<!--            <div v-bind:class="[isActive == 4 ? 'quarter-div': '',isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9': '', 'yellow']" id="conferenceVideoDiv_2">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
<!--            <div v-bind:class="[isActive == 4 ? 'quarter-div': '',isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9': '', 'yellow']" id="conferenceVideoDiv_3">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
<!--            <div v-show="isActive == 9 || isActive == 16" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9':'']" id="conferenceVideoDiv_4">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
<!--            <div v-show="isActive == 9 || isActive == 16" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9':'']" id="conferenceVideoDiv_5">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
<!--            <div v-show="isActive == 9 || isActive == 16" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9':'']" id="conferenceVideoDiv_6">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
<!--            <div v-show="isActive == 9 || isActive == 16" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9': '']" id="conferenceVideoDiv_7">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
<!--            <div v-show="isActive == 9 || isActive == 16" v-bind:class="[isActive == 9 ? 'quarter-div4': '',isActive == 16 ? 'quarter-div9': '']" id="conferenceVideoDiv_8">-->
<!--              <img src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--            </div>-->
            <img class="conferenceVoice_Img" src="@/assets/icons/conference/conferenceVoice-content.png" alt="">
          </div>
        </template>
        <div class="conferenceVideoCentreRight">
          <div class="conferenceVideoCentreRightBox">
            <template v-if="ConferenceInfo.type ==='Video'">
              <div class="conferenceVideoCentreRightUP" id="conferenceVideoLocal_div"></div>
            </template>
<!--            <template v-if="ConferenceInfo.type ==='Voice'">-->
<!--              <div class="conferenceVideoCentreRightUP">-->
<!--                <img style="height: 99%;width: 99%" src="@/assets/icons/conference/conferenceVoice.jpg" alt="">-->
<!--              </div>-->
<!--            </template>-->
            <template v-if="ConferenceInfo.type ==='Video'">
            <div class="conferenceVideoCentreRightMember">
              <!--会议成员-->
              <div class="conferenceVideoCentreRightMemberList"
                   v-for="(item,index) in conferenceMemData">
                <div class="conferenceVideoCentreRightMemberList-left">
                  <div class="conferenceVideoCentreRightMemberList-leftText">{{item.MemberName.slice(0,1)}}</div>
                </div>
                <div class="conferenceVideoCentreRightMemberList-men">{{item.MemberName}}</div>
                <template v-if="item.Status ==1">
                  <div class="conferenceVideoCentreRightMemberList-status">已接入</div>
                </template>
                <template v-if="item.Status ==2">
                  <div class="conferenceVideoCentreRightMemberList-status">未接入</div>
                </template>
                <template v-if="item.Status ==3">
                  <div class="conferenceVideoCentreRightMemberList-status">连接中</div>
                </template>
<!--                <template v-if="item.Focus&&item.Focus ==1">-->
<!--                  <div class="conferenceVideoCentreRightMemberList-Focus">演讲者</div>-->
<!--                </template>-->
<!--                <template v-else>-->
<!--                  <div class="conferenceVideoCentreRightMemberList-Focus"></div>-->
<!--                </template>-->
                <div class="conferenceVideoCentreRightMemberList-hold">
                  <template v-if="item.isHold == 1">      <!--主持人-->
                    <img class="HoldImg" title="主持人"  src="@/assets/icons/conference/conferenceVideo/Hold.png" alt="">
                  </template>
                </div>
                <div class="conferenceVideoCentreRightMemberList-voice"
                     @click="conferenceSetMemMute(item)">
                  <template v-if="item.Mute ==0">      <!--可讲话-->
                    <img class="voiceImg" src="@/assets/icons/conference/conferenceVideo/voice.png" alt="">
                  </template>
                  <template v-if="item.Mute ==1">      <!--静音-->
                    <img  class="voiceImg" src="@/assets/icons/conference/conferenceVideo/voicemute.png" alt="">
                  </template>
                </div>
                <div class="conferenceVideoCentreRightMemberList-more">
                  <el-dropdown trigger="click"
                               @command="(command) => handleConferenceRoomCommand(command,item)">
                    <span>
                         <img class="voiceMoreImg" src="@/assets/icons/conference/conferenceVideo/more.png" alt="">
                    </span>
                    <el-dropdown-menu slot="dropdown" class="conferenceVideoCentreRightMemberList-more-dropdown-menu">
                      <el-dropdown-item command="kickOut">踢出</el-dropdown-item>
                      <el-dropdown-item command="inviteJoinIn">邀请加入</el-dropdown-item>
                      <el-dropdown-item command="setHolder">设为主持人</el-dropdown-item>

<!--                      <template v-if="item.Focus&&item.Focus ==1&&ConferenceInfo.type ==='Video'">-->
<!--                        <el-dropdown-item command="setFocusCancel">取消演讲者</el-dropdown-item>-->
<!--                      </template>-->
<!--                      <template v-if="ConferenceInfo.type ==='Video'&&(!item.Focus||item.Focus ==0)">-->
<!--                        <el-dropdown-item command="setFocus">设为演讲者</el-dropdown-item>-->
<!--                      </template>-->

                      </el-dropdown-menu>
                    </el-dropdown>
                  </div>
                </div>
              </div>
            </template>
            <template v-if="ConferenceInfo.type ==='Voice'">
              <div class="conferenceVideoCentreRightMember_Voice">
                <!--会议成员-->
                <div class="conferenceVideoCentreRightMemberList"
                     v-for="(item,index) in conferenceMemData">
                  <div class="conferenceVideoCentreRightMemberList-left">
                    <div class="conferenceVideoCentreRightMemberList-leftText">{{item.MemberName.slice(0,1)}}</div>
                  </div>
                  <div :title="item.MemberName" class="conferenceVideoCentreRightMemberList-men">{{item.MemberName}}</div>
                  <template v-if="item.Status ==1">
                    <div class="conferenceVideoCentreRightMemberList-status">已接入</div>
                  </template>
                  <template v-if="item.Status ==2">
                    <div class="conferenceVideoCentreRightMemberList-status">未接入</div>
                  </template>
                  <template v-if="item.Status ==3">
                    <div class="conferenceVideoCentreRightMemberList-status">连接中</div>
                  </template>
                  <!--                <template v-if="item.Focus&&item.Focus ==1">-->
                  <!--                  <div class="conferenceVideoCentreRightMemberList-Focus">演讲者</div>-->
                  <!--                </template>-->
                  <!--                <template v-else>-->
                  <!--                  <div class="conferenceVideoCentreRightMemberList-Focus"></div>-->
                  <!--                </template>-->
                  <div class="conferenceVideoCentreRightMemberList-hold">
                    <template v-if="item.isHold == 1">      <!--主持人-->
                      <img class="conferenceIcon" src="@/assets/icons/conference/conferenceVideo/Hold.png" alt="">
                    </template>
                  </div>
                  <div class="conferenceVideoCentreRightMemberList-voice"
                       @click="conferenceSetMemMute(item)">
                    <template v-if="item.Mute ==0">      <!--可讲话-->
                      <img class="conferenceIcon" src="@/assets/icons/conference/conferenceVideo/voice.png" alt="">
                    </template>
                    <template v-if="item.Mute ==1">      <!--静音-->
                      <img class="conferenceIcon"src="@/assets/icons/conference/conferenceVideo/voicemute.png" alt="">
                    </template>
                  </div>
                  <div class="conferenceVideoCentreRightMemberList-more">
                    <el-dropdown trigger="click"
                                 @command="(command) => handleConferenceRoomCommand(command,item)">
                    <span>
                         <img class="conferenceIconMore" src="@/assets/icons/conference/conferenceVideo/more.png" alt="">
                    </span>
                      <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item command="kickOut">踢出</el-dropdown-item>
                        <el-dropdown-item command="inviteJoinIn">邀请加入</el-dropdown-item>
                        <el-dropdown-item command="setHolder">设为主持人</el-dropdown-item>
                        <!--                      <template v-if="item.Focus&&item.Focus ==1&&ConferenceInfo.type ==='Video'">-->
                        <!--                        <el-dropdown-item command="setFocusCancel">取消演讲者</el-dropdown-item>-->
                        <!--                      </template>-->
                        <!--                      <template v-if="ConferenceInfo.type ==='Video'&&(!item.Focus||item.Focus ==0)">-->
                        <!--                        <el-dropdown-item command="setFocus">设为演讲者</el-dropdown-item>-->
                        <!--                      </template>-->

                      </el-dropdown-menu>
                    </el-dropdown>
                  </div>
                </div>
              </div>
            </template>
          </div>
        </div>
      </div>
      <!--视频下部区域-->
      <div class="conferenceVideoDown">
        <div class="conferenceVideoIcon01">
          <div class="closeConferenceRoomButton" @click="closeConfrenceRoomVisible = true">
            <span class="closeButtomText">结束会议</span>
          </div>
<!--          <div class="conferenceVideoIconS" @click="quitConference">-->
<!--            <img class="conferenceVideoIconImg" src="@/assets/icons/conference/conferenceVideo/quit.png"-->
<!--                 alt="">-->
<!--            <p class="conferenceVideoIconText">退出</p>-->
<!--          </div>-->
<!--          <div class="conferenceVideoIconS" @click="closeConference">-->
<!--            <img class="conferenceVideoIconImg"-->
<!--                 src="@/assets/icons/conference/conferenceVideo/close.png" alt="">-->
<!--            <p class="conferenceVideoIconText">挂断</p>-->
<!--          </div>-->
<!--          <div class="conferenceVideoIconS" @click="canvastest">-->
<!--          <p class="conferenceVideoIconText">测试</p>-->
<!--        </div>-->
        </div>
        <div class="conferenceVideoIcon02">
<!--          <div class="conferenceVideoIconS" :style="ConferenceCtrBtn">-->
<!--            <img class="conferenceVideoIconImg"-->
<!--                 src="@/assets/icons/conference/conferenceVideo/fullScreen.png" alt="">-->
<!--            <p class="conferenceVideoIconText">全屏</p>-->
<!--          </div>-->
          <div class="conferenceVideoIconS" @click="shareConferenceScreen" :style="ConferenceCtrBtn1">
            <img class="conferenceVideoIconImg "
                 src="@/assets/icons/conference/conferenceVideo/share.png" alt="">
            <template v-if="ScreenShare">
              <p class="conferenceVideoIconText p_ScreenShareCancle">取消共享</p>
            </template>
            <template v-if="!ScreenShare">
              <p class="conferenceVideoIconText p_ScreenShare">共享</p>
            </template>

          </div>
          <div class="conferenceVideoIconS" @click="addConferenceMem">
            <img class="conferenceVideoIconImg"
                 src="@/assets/icons/conference/conferenceVideo/invite.png" alt="">
            <p class="conferenceVideoIconText">邀请</p>
          </div>
<!--          <div class="conferenceVideoIconS">-->
<!--            <img class="conferenceVideoIconImg conferenceVideoIconMem"-->
<!--                 src="@/assets/icons/conference/conferenceVideo/member.png" alt="">-->
<!--            <p class="conferenceVideoIconText">与会者</p>-->
<!--          </div>-->
<!--          <div class="conferenceVideoIconS" :style="ConferenceCtrBtn">-->
<!--            <img class="conferenceVideoIconImg"-->
<!--                 src="@/assets/icons/conference/conferenceVideo/screencap.png" alt="">-->
<!--            <p class="conferenceVideoIconText">录屏</p>-->
<!--          </div>-->
          <div class="conferenceVideoIconS" @click="changeMicButton">
            <template v-if="conferenceMic ==0">      <!--麦克关闭-->
              <img class="conferenceVideomicImg" style="height: 30px"
                   src="@/assets/icons/conference/conferenceVideo/micOff.png" alt="">
            </template>
            <template v-if="conferenceMic ==1">      <!--麦克打开-->
              <img class="conferenceVideomicImg" style="height: 30px"
                   src="@/assets/icons/conference/conferenceVideo/micOn.png" alt="">
            </template>
            <p class="conferenceVideoIconText">麦克风</p>
          </div>
          <el-dropdown @command="(command) => handleMicphoneChange(command)" trigger="click">
            <span class="el-dropdown-link showDeviceList">
               <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item v-for="(item,index) in MicphoneList" :key="index" :command="item">
                {{item.label}}
                <template v-if="item.deviceId ==UsingMicphone.deviceId">
                  <i class="el-icon-check"></i>
                </template>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <div class="conferenceVideoIconS"  id="conferenceVideoIconVoiceS" @click="changeVoiceButton">
            <template v-if="conferenceVoice ==0">        <!--扬声器关闭-->
              <img class="conferenceVideoIconImg"
                   src="@/assets/icons/conference/conferenceVideo/voiceOff.png" alt="">
            </template>
            <template v-if="conferenceVoice ==1">      <!--扬声器关闭-->
              <img class="conferenceVideoIconImg"
                   src="@/assets/icons/conference/conferenceVideo/voiceOn.png" alt="">
            </template>
            <p class="conferenceVideoIconText conferenceVideoVoiceText">扬声器</p>
          </div>
          <el-dropdown @command="(command) => handleSpeakerChange(command)" trigger="click">
            <span class="el-dropdown-link showDeviceList">
               <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item v-for="(item,index) in SpeakerList" :key="index" :command="item">
                {{item.label}}
                <template v-if="item.deviceId ==UsingSpeaker.deviceId">
                  <i class="el-icon-check"></i>
                </template>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <div class="conferenceVideoIconS" id="conferenceVideoIconCameraS" @click="changeCameraButton" :style="ConferenceCtrBtn2">
            <template v-if="conferenceCamera ==0">      <!--摄像头关闭-->
              <img class="conferenceVideoIconImg conferenceVideoIconCamera"
                   src="@/assets/icons/conference/conferenceVideo/cameraOff.png"
                   alt="">
              <p class="conferenceVideoIconText conferenceVideoCameraOffText">摄像头</p>
            </template>
            <template v-if="conferenceCamera ==1">      <!--摄像头打开-->
              <img class="conferenceVideoIconImg conferenceVideoIconCamera"
                   src="@/assets/icons/conference/conferenceVideo/cameraOn.png" alt="">
              <p class="conferenceVideoIconText conferenceVideoCameraOnText">摄像头</p>
            </template>
          </div>
          <el-dropdown @command="(command) => handleCameraChange(command)" trigger="click">
            <span class="el-dropdown-link showDeviceList">
               <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item v-for="(item,index) in CameraList" :key="index" :command="item">
                {{item.label}}
                <template v-if="item.deviceId ==UsingCamera.deviceId">
                  <i class="el-icon-check"></i>
                </template>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </div>
        <div class="conferenceVideoIcon03">
          <div class="conferenceVideoIconVoice">
            <el-slider class="conferenceVoiceChangeStyle" v-model="conferenceVoiceChange" @change="changeVoice">33</el-slider>
            <p class="conferenceVideoIconText conferenceVideoIconVolumeText">音量</p>
          </div>
        </div>
        <div class="conferenceVideoIcon04">
          <div class="allVoiceShout" @click="conferenceMuteAll">
            <template v-if="conferenceMuteAllStatus ==0">
              <div class="allVoiceShoutText">全部静音</div>
            </template>
            <template v-if="conferenceMuteAllStatus ==1">
              <div class="allVoiceShoutText">取消全部静音</div>
            </template>
          </div>
        </div>
      </div>
    </div>
  </div>
    <div v-if="showIntercomGroup">
      <el-dialog title="选择 " class="el-dialogStyle" :visible.sync="showIntercomGroup"
                 width="90%"
                 center
                 top="6vh"
      >
        <IntercomGroup style="z-index: 999999" :FleetId=FleetId :scsAbFleetId="scsAbFleetId" :UserAccount="userInfo.account"
                       :userId="userInfo.userId":userExtnum="userInfo.extnum" :courentType="type"
                       @changeShow="handleChildClose" @childConfirm="childHandleConfirm(arguments)"
                       ref="addOrUpdateRef"></IntercomGroup>
      </el-dialog>
    </div>
    <!--关闭会议弹框-->
    <div class="closeConfrenceRoom" v-show="closeConfrenceRoomVisible">
      <div class="closeConfrenceRoomBody">
        <div class="closeConfrenceRoom-top">
          <div class="closeConfrenceRoom-topL">
            <span class="closeConfrenceRoom-topLText">退出会议</span>
          </div>
        </div>
        <div class="closeConfrenceRoom-center">
          <span class="closeConfrenceRoom-centerText">结束会议将关闭会议室，确定结束吗？</span>
        </div>
        <div  class="closeConfrenceRoom-bottom">
          <div v-if="false" class="closeConfrenceRoom-bottomContainer">
            <div @click="closeConfrenceRoomVisible = false" class="closeConfrenceRoom-bottom-cancle">
              <span class="closeConfrenceRoom-bottomTxt">取消</span>
            </div>
            <div @click="closeConference"
                 class="closeConfrenceRoom-bottom-close">
              <span class="closeConfrenceRoom-bottomTxt">结束会议</span>
            </div>
            <div @click="quitConference"
                 class="closeConfrenceRoom-bottom-quit">
              <span class="closeConfrenceRoom-bottomTxt">离开会议</span>
            </div>
          </div>
          <div  class="closeConfrenceRoom-bottomContainer" >
            <el-button @click="closeConfrenceRoomVisible = false" size="medium"class="conferenceBtn1280Size">取 消</el-button>
            <el-button @click="closeConference" type="primary"  size="medium" class="conferenceBtn1280Size">结束会议</el-button>
            <el-button @click="quitConference" type="primary"  size="medium"class="conferenceBtn1280Size">离开会议</el-button>
          </div>
        </div>
      </div>
  </div>
  </div>
</template>

<script>
  import Vue from 'vue';
  import newsApi from '@/api/news';
  import MessageApi from '@/api/MessageApi';
  import DispatchSystemAddressBook from '@/api/DispatchSystemAddressBook';
  import conferenceApi from '@/api/conference';
  import DispatchVoiceApi from '@/api/DispatchVoiceApi';
  import BroadcastNoticeApi from '@/api/BroadcastNotice';
  import IntercomApi from '@/api/IntercomApi';
  import FleetIdControllerApi from '@/api/FleetIdController';
  import dispatchIcon from '../assets/icons/dispatch/call.png';
  import {ScsConstants} from '../js/ScsConstants';
  import {AgentConstants} from '../js/AgentConstants';
  import {MessageConstants} from '../js/MessageConstants';
  import {IntercomConstants} from '../js/IntercomConstants';
  import {ScsPocConstants} from '../js/pocConstants';
  import {DasConstant} from '../js/DasConstant';
  import {Map_D} from '../js/ScsObject';
  import {DispatchvoiceCtrl} from '../js/Dispatchvoice';
  import {DispatchpocCtrl} from '../js/DispatchpocCtrl';
  import {DispatchmessageCtrl} from '../js/Message';
  import {ConferenceCtrl} from '../js/Conference';
  import {DispatchOtherCtrl} from '../js/OtherMoreLib';
  import $ from 'jquery';
  import '@/plugins/Tdrag/Tdrag';
  import {GpsConvert} from '../js/gpsConvert';
  import screenfull from 'screenfull';

  // import emojiJSON from '@/plugins/emojiJSON.json'
  import faceList from '../plugins/faceList';
  import CommonChooseDialog from '../api/CommonChooseDialog';
  import AgentApi from '../api/AgentApi';
  import {DispatchCtrlLib} from '../chromeLib/DispatchCtrlLib';
  import {Callbackfuc} from '../chromeLib/Callbackfuc';
  // 导入组件
  import ElImageViewer from 'element-ui/packages/image/src/image-viewer';
  //导入api
  import PersonalAddressBookManageApi from '@/api/dataManages/PersonalAddressBookManage';
  import SystemAddressBookManageApi from '@/api/dataManages/SystemAddressBookManage';
  //独立组件
  import IntercomGroup from '@/components/intercomGroup/IntercomGroup';
  import Dialpad from '@/components/Dialpad/Dialpad';
  import FleetManage from '@/views/dataManagement/FleetManage';
  import UserManage from '@/views/dataManagement/UserManage';
  import SubscriberManage from '@/views/dataManagement/SubscriberManage';
  import IntercomGroupManage from '@/views/dataManagement/IntercomGroupManage';
  import PersonalAddressBookManage from '@/views/dataManagement/PersonalAddressBookManage';
  import SystemAddressBookManage from '@/views/dataManagement/SystemAddressBookManage';
  import AuthorityGroupManage from '@/views/dataManagement/AuthorityGroupManage';
  import RoleManage from '@/views/dataManagement/RoleManage';
  import EmergencyNumberManage from '@/views/dataManagement/EmergencyNumberManage';
  import InventGroupManage from '@/views/dataManagement/InventGroupManage';
  import Testw from '@/views/dataManagement/Testw';
  import AllHistoryCall from '@/views/comCompontents/AllHistoryCall';

  const tableOutDatas = [];
  var MyComponent1 = Vue.extend({
    template: `<span @click='add()'>点击</span>`,
    methods: {
      add() {
        console.log('触发点击事件');
      },
    },
  });
  export default {
    name: 'ConferenceRoom',
    components: {
      ElImageViewer,
      IntercomGroup,
      Dialpad,
      FleetManage,
      UserManage,
      SubscriberManage,
      IntercomGroupManage,
      PersonalAddressBookManage,
      SystemAddressBookManage,
      AuthorityGroupManage,
      RoleManage,
      EmergencyNumberManage,
      InventGroupManage,
      AllHistoryCall,
      Testw,
    },

    data () {
      return {
        userInfo: {

        },
        FleetId:0,
        scsAbFleetId:0,
        isActive:9,
        ConferenceInfo:{
          type:"Voice",
          pwd:"",
          msg:"",
        },
        isTalkingMemName:'',
        isTalkingMemObj:[
          // {
          //   ExtNum:"1",
          //   MemName:"111",
          // },
          // {
          //   ExtNum:"2",
          //   MemName:"222",
          // },
        ],
        VideoMemberArray:[
          {
            extnum:"0",
            name:"测试调度员",
            micStatus:0,
            isShow:false,
          },
          {
            extnum:"1",
            name:"测试调度员1111",
            micStatus:0,
            isShow:false,
          },
          {
            extnum:"2",
            name:"test2",
            micStatus:0,
            isShow:false,
          },
          {
            extnum:"3",
            name:"test3",
            micStatus:0,
            isShow:false,
          },
          {
            extnum:"4",
            name:"test4",
            micStatus:0,
            isShow:false,
          },
          {
            extnum:"5",
            name:"test5",
            micStatus:0,
            isShow:false,
          },
          {
            extnum:"6",
            name:"test6",
            micStatus:0,
            isShow:false,
          },
          {
            extnum:"7",
            name:"test7",
            micStatus:0,
            isShow:false,
          },
          {
            extnum:"8",
            name:"test8",
            micStatus:0,
            isShow:false,
          },
        ],
        cameraOff:0,     //进入会议摄像头是否打开  0 表示打开  1表示关闭
        micphoneOff:0,     //进入会议麦克风是否打开  0 表示打开  1表示关闭
        /*会议*/
        ConferenceCtrBtn1:{
          cursor: 'pointer',
        },
        ConferenceCtrBtn2:{
          cursor: 'pointer',
        },
        //从我的会议加入时候的会议信息保存在此
        joinInRoomInfo: {},
        //会议室信息
        currentConferenceId: '000000',
        //会议室的channelId
        channelId:-1,
        //会议邀请成员
        inviteListData: [],
        //预约会议邀请成员
        appointInviteData: [],
        //我加入的会议
        myRoomList: [],
        //我加入的预约会议
        myAppointRoomList: [],
        //会议内全部禁言状态   默认为0：0-可讲话状态；1-禁言状态
        conferenceMuteAllStatus: 0,
        elpopover_visible:false,
        elpopovervoice_visible:false,
        elpopovermic_visible:false,
        //会议内成员信息
        conferenceMemData: [
          {
            MemberName:"kfkf"

          }
        ],
        //本机是否在屏幕共享
        ScreenShare:false,
        //视频框加载数据
        ConferenceInitDivArray: [],
        ConferenceInitLocalDivArray:[],
        conferenceVoiceChange: 50,   //会议音量控制
        conferenceMic: 1,            //会议室mic状态  0-关闭 1-打开 默认打开
        conferenceCamera: 1,         //会议室摄像头状态  0-关闭 1-打开 默认打开
        conferenceVoice: 1,          //会议室扬声器状态  0-关闭 1-打开 默认打开
        //摄像头设备列表
        CameraList:[],
        //当前摄像头
        UsingCamera:{},
        //扬声器设备列表
        SpeakerList:[],
        //当前扬声器
        UsingSpeaker:{},
        //麦克风设备列表
        MicphoneList:[],
        //当前麦克风
        UsingMicphone:{},
        //全部设备列表
        DeviceList:[],
        // 控制新增编辑弹窗的显示与隐藏
        addOrUpdateVisible: false,
        // 控制选人组件的显示与隐藏
        showIntercomGroup: false,
        //传给选人子组件的类型判断
        type: '',
        IntercomGroup: true,
        closeConfrenceRoomVisible:false,
        //主持人分机号
        HostExtNum:"",
        //屏幕共享人分机号
        ScreenShareExtNum:"",
      }
      },
    directives: {
      drag (el) {
        let oDiv = el; //当前元素
        oDiv.onmousedown = function (e) {
          //鼠标按下，计算当前元素距离可视区的距离
          let disX = e.clientX - oDiv.offsetLeft;
          let disY = e.clientY - oDiv.offsetTop;
          document.onmousemove = function (e) {
            //通过事件委托，计算移动的距离
            let l = e.clientX - disX;
            let t = e.clientY - disY;
            // 防止越界
            if (l < 0) {
              l = 0;
            }
            /* document.documentElement.clientWidth
            获取浏览器窗口文档显示区域的宽度，不包括滚动条。

            document.documentElement.clientHeight
            获取浏览器窗口文档显示区域的高度，不包括滚动条。*/

            //如果左侧的距离>屏幕的宽度-元素的宽度。也就是说元素的右侧超出屏幕的右侧，就让元素的右侧在屏幕的右侧上
            if (l > document.documentElement.clientWidth - oDiv.getBoundingClientRect().width) {
              l = document.documentElement.clientWidth - oDiv.getBoundingClientRect().width;
            }
            console.log(document.documentElement.clientWidth);
            if (t < 0) {
              t = 0;
            }
            if (t > document.documentElement.clientHeight - (oDiv.offsetHeight - 400)) {
              t = document.documentElement.clientHeight - (oDiv.offsetHeight - 400);
            }
            if (t > document.body.clientHeight - oDiv.getBoundingClientRect().height) {
              // t = document.body.clientHeight - oDiv.getBoundingClientRect().height - 120
              t = 0;
            }
            //移动当前元素
            oDiv.style.left = l + 'px';
            oDiv.style.top = t + 'px';
          };
          document.onmouseup = function (e) {
            document.onmousemove = null;
            document.onmouseup = null;
          };
        };
      },
      clickPo (el) {
        let oDiv = el; //当前元素
        oDiv.onmousedown = function (e) {
          //鼠标按下，计算当前元素距离可视区的距离
          let disX = e.clientX - oDiv.offsetLeft;
          let disY = e.clientY - oDiv.offsetTop;
          document.onmousemove = function (e) {
            //通过事件委托，计算移动的距离
            let l = e.clientX - disX;
            let t = e.clientY - disY;
            // 防止越界
            if (l < 0) {
              l = 0;
            }
            /* document.documentElement.clientWidth
            获取浏览器窗口文档显示区域的宽度，不包括滚动条。

            document.documentElement.clientHeight
            获取浏览器窗口文档显示区域的高度，不包括滚动条。*/

            //如果左侧的距离>屏幕的宽度-元素的宽度。也就是说元素的右侧超出屏幕的右侧，就让元素的右侧在屏幕的右侧上
            if (l > document.documentElement.clientWidth - oDiv.getBoundingClientRect().width) {
              l = document.documentElement.clientWidth - oDiv.getBoundingClientRect().width;
            }
            console.log(document.documentElement.clientWidth);
            if (t < 0) {
              t = 0;
            }
            if (t > document.documentElement.clientHeight - (oDiv.offsetHeight - 400)) {
              t = document.documentElement.clientHeight - (oDiv.offsetHeight - 400);
            }
            if (t > document.body.clientHeight - oDiv.getBoundingClientRect().height) {
              // t = document.body.clientHeight - oDiv.getBoundingClientRect().height - 120
              t = 0;
            }
            //移动当前元素
            oDiv.style.left = l + 'px';
            oDiv.style.top = t + 'px';
          };
          document.onmouseup = function (e) {
            document.onmousemove = null;
            document.onmouseup = null;
          };
        };
      },
    },
    created () {
      this.saveNewPageInfo();   //保存新开页面跳转过来的信息
      this.changeCtrBtn();
    },

    mounted () {
      /*初始化处理*/
      window.NewPageLoginRsp = this.NewPageLoginRsp;
      /*会议处理*/
      window.NewPageConference = this.NewPageConference;
      //处理退出回调
      window.LogoutRspdeal = this.LogoutRspdeal;
      DispatchCtrlLib.Initialize(Callbackfuc.DispatchCallbackNew);
    },

    methods: {
      // 测试专用  后续删除
      testbutton1(){
        let Obj = {
          ExtNum:"3",
          MemName:"333",
        }
        let obj ={
          ExtNum:Obj.ExtNum,
          MemName:Obj.MemName,
        }
        this.isTalkingMemObj.push(obj);               //增加正在讲话的成员
        this.refreshTalkingMemName();
      },
      testbutton11(){
        let Obj = {
          ExtNum:"4",
          MemName:"444",
        }
        let obj ={
          ExtNum:Obj.ExtNum,
          MemName:Obj.MemName,
        }
        this.isTalkingMemObj.push(obj);               //增加正在讲话的成员
        this.refreshTalkingMemName();
      },
      testbutton2(){
        let that = this;
        let index;
        let Obj = {
          ExtNum:"3",
          MemName:"333",
        }
        let obj ={
          ExtNum:Obj.ExtNum,
          MemName:Obj.MemName,
        }
        for (var i = 0; i < that.isTalkingMemObj.length; i++) {                                 //获取该成员在成员列表数组中的位置
          if (that.isTalkingMemObj[i].ExtNum == obj.ExtNum) {
            index = i;
          }
        }
        that.isTalkingMemObj.splice(index, 1);                           //成员停止讲话时候，删除正在讲话列表中的该成员
        that.refreshTalkingMemName();
      },
      testbutton21(){
        let that = this;
        let index;
        let Obj = {
          ExtNum:"4",
          MemName:"444",
        }
        let obj ={
          ExtNum:Obj.ExtNum,
          MemName:Obj.MemName,
        }
        for (var i = 0; i < that.isTalkingMemObj.length; i++) {                                 //获取该成员在成员列表数组中的位置
          if (that.isTalkingMemObj[i].ExtNum == obj.ExtNum) {
            index = i;
          }
        }
        that.isTalkingMemObj.splice(index, 1);                           //成员停止讲话时候，删除正在讲话列表中的该成员
        that.refreshTalkingMemName();
      },
      refreshTalkingMemName(){                                            //更新正在讲话的成员列表
        console.log(this.isTalkingMemObj);
        let talkingMemName ="";
        for (var i = 0; i < this.isTalkingMemObj.length; i++) {                                 //获取正在讲话的成员列表
          talkingMemName +=this.isTalkingMemObj[i].MemName+",";
        }
        this.isTalkingMemName = talkingMemName;
        if(this.isTalkingMemName.length>0){                                //获取正在讲话的成员名称
          this.isTalkingMemName = this.isTalkingMemName.substring(0,
            this.isTalkingMemName.length - 1);
        }
        console.log(this.isTalkingMemName);
      },
      startConferenceRoom(){
        // if(this.ConferenceInfo.msg =="join"){
        //   setTimeout(() => {
        //     this.testEquipment();
        //   }, 500);
        // }else{
          setTimeout(() => {
            console.log("handleInComingConf");
            if(this.ConferenceInfo.msg&&this.ConferenceInfo.msg =="handleInComingConf"){
              ConferenceCtrl.VoipLastIncomingCall();
              // this.showInComingConferenceScreen(this.currentConferenceId + '',this.ConferenceInfo.type);    //显示会议的界面
            }else{
              console.log("NotHandleInComingConf");
              this.showConferenceScreen(this.currentConferenceId + '',this.ConferenceInfo.type);    //显示会议的界面
            }
          }, 1000);
        // }
      },
      testConferenceRoomData(){
        console.log(this.conferenceMemData);
      },

      /**
       * 保存页面跳转信息
       * @param
       */
      saveNewPageInfo(){
        this.userInfo = JSON.parse(this.$route.query.userInfo);
        this.FleetId = parseInt(this.$route.query.fleetId);
        this.scsAbFleetId = this.$route.query.scsAbFleetId;
        this.ConferenceInfo.type = this.$route.query.type;
        this.ConferenceInfo.pwd = this.$route.query.pwd;
        this.currentConferenceId = this.$route.query.confId;
        this.inviteListData = JSON.parse(this.$route.query.inviteList);
        this.ConferenceInfo.msg = this.$route.query.msg;
        if(this.$route.query.cameraOff){
          this.cameraOff = this.$route.query.cameraOff
        }
        if(this.$route.query.micphoneOff){
          this.micphoneOff = this.$route.query.micphoneOff
        }
        console.log("调度台信息");
        console.log(this.userInfo);
        console.log(this.ConferenceInfo.type);
        console.log(this.ConferenceInfo.pwd);
        console.log(this.currentConferenceId);
        console.log(this.inviteListData);
        console.log(this.ConferenceInfo.msg);
        console.log("测试携带数据！");
        console.log("测试摄像头开关"+this.cameraOff);
        console.log("测试麦克风开关"+this.micphoneOff);
      },
      /**
       * 改变按钮状态
       * @param
       */
      changeCtrBtn(){
        if(this.ConferenceInfo.type =="Voice"){
          this.ConferenceCtrBtn1.cursor = "not-allowed";
          this.ConferenceCtrBtn2.cursor = "not-allowed";
        }else{
          this.ConferenceCtrBtn1.cursor = "pointer";
          this.ConferenceCtrBtn2.cursor = "pointer"
          if(this.cameraOff ==1){
            this.conferenceCamera = 0;
          }else{
            this.conferenceCamera = 1;
          }
        }
        if(this.micphoneOff ==1){
          this.conferenceMic = 0;
        }else{
          this.conferenceMic = 1;
        }
      },
      // canvastest(){
      //   //判断是否为视频会议，如果是视频会议则初始化视频框
      //   if(this.ConferenceInfo.type==="Video"){
      //     let a = ConferenceCtrl.ConferenceCanvasInit();
      //     this.ConferenceInitDivArray = a;
      //     console.log('视频框初始化成功');
      //   }
      //   setTimeout(() => {
      //     this.showConferenceScreen(this.currentConferenceId + '',this.ConferenceInfo.type);    //显示会议的界面
      //   }, 200);
      // },
      //监控成员变化，以便于切换d四宫格九宫格
      monitorDivChange(){
        if(this.ConferenceInfo.type =="Video") {
          console.log(this.conferenceMemData.length);
          if(this.conferenceMemData.length-1 <= 2){
            this.isActive = 2;
          }else if (this.conferenceMemData.length-1 <= 4&&this.conferenceMemData.length-1 >2) {
            this.isActive = 4;
          } else if(this.conferenceMemData.length-1 >4&&this.conferenceMemData.length-1 <= 6){
            this.isActive = 6;
          }else if(this.conferenceMemData.length-1 > 6){
            this.isActive = 9;
          }
        }
      },
      /**
       * 登录回调
       * @param
       */
      NewPageLoginRsp(){
        console.log("websockt登录成功！！！！");
        DispatchOtherCtrl.WinSetName("Conference");
        //判断是否为视频会议，如果是视频会议则初始化视频框
        if(this.ConferenceInfo.type==="Video"){
          // let a = ConferenceCtrl.ConferenceCanvasInit();
          let a  =ConferenceCtrl.ConferenceCanvasInitTest();
          let b  =ConferenceCtrl.VideoLibConferenceLocalArray();
          this.isActive =2;
          this.ConferenceInitDivArray = a;
          this.ConferenceInitLocalDivArray = b;
          console.log('视频框初始化成功!');
          console.log(this.ConferenceInitDivArray);
          console.log(this.ConferenceInitLocalDivArray);
        }
        this.startConferenceRoom();
        // if(this.ConferenceInfo.msg =="join"){
        //   setTimeout(() => {
        //     this.testEquipment();
        //   }, 500);
        // }else{
        //   setTimeout(() => {
        //     if(this.ConferenceInfo.msg&&this.ConferenceInfo.msg =="handleInComingConf"){
        //       this.showInComingConferenceScreen(this.currentConferenceId + '',this.ConferenceInfo.type);    //显示会议的界面
        //     }else{
        //       this.showConferenceScreen(this.currentConferenceId + '',this.ConferenceInfo.type);    //显示会议的界面
        //     }
        //   }, 1000);
        // }
      },
      /**
       * 展示会议界面(接受邀请的时候进入会议)
       * param  会议室ID   string
       * 会议类型   type  Video-视频    Voice-语音
       */
      showInComingConferenceScreen(confId, type){
        ConferenceCtrl.ConferenceHandleInvite(1);
        if(type ==="Video"){
          //TODO 显示视频画面
          // console.log("startdisplat "+this.channelId);
          // this.ConferenceInitDivArray[1].StartDisplay(-1);
          // console.log("startdisplat   -1");
        }else if(type ==="Voice"){

        }else{
            console.log(ScsConstants.Parametor_Error);
            return;
        }
        setTimeout(() => {
          this.testEquipment();
        }, 500);
      },
      /**
       * 展示会议界面
       * param  会议室ID   string
       * 会议类型   type  Video-视频    Voice-语音
       * msg       "join"-主动加入到会议室（不需要邀请人）    undefined-自己创建会议室邀请人
       */
      showConferenceScreen(confId, type){
        console.log("showConferenceScreen");
        this.ConferenceInfo.pwd =this.ConferenceInfo.pwd||"";
        console.log(this.ConferenceInfo.pwd);
        if(type ==="Video"){
          let channelId;
          if (this.ConferenceInfo.pwd == '' || this.ConferenceInfo.pwd == undefined || this.ConferenceInfo.pwd == null||this.ConferenceInfo.pwd == 'undefined') {
            channelId = ConferenceCtrl.MakeConference(confId + '', 1);
          }else{
            channelId = ConferenceCtrl.MakeConference(confId + '', 1, this.ConferenceInfo.pwd);
          }
          // let channelId = ConferenceCtrl.MakeConference(confId + '', 1);
          if(channelId>-1){
            this.channelId = parseInt(channelId);
          }else{
            console.log(ScsConstants.Parametor_Error);
            return;
          }
          // this.ConferenceInitDivArray[0].StartDisplay(-1);  //默认第一个显示本地画面
          // this.ConferenceInitDivArray[0].isUse = 1;
          // this.ConferenceInitDivArray[0].useExt = this.userInfo.extnum;
        }else if(type ==="Voice"){
          let channelId;
          if (this.ConferenceInfo.pwd == '' || this.ConferenceInfo.pwd == undefined || this.ConferenceInfo.pwd == null||this.ConferenceInfo.pwd == 'undefined') {
            channelId = ConferenceCtrl.MakeConference(confId + '', 0);
          }else{
            channelId = ConferenceCtrl.MakeConference(confId + '', 0, this.ConferenceInfo.pwd);
          }
          // let channelId = ConferenceCtrl.MakeConference(confId + '', 0, this.ConferenceInfo.pwd);
          // let channelId = ConferenceCtrl.MakeConference(confId + '', 0);
          if(channelId>-1){
            this.channelId = parseInt(channelId);
          }else{
            console.log(ScsConstants.Parametor_Error);
            return;
          }
        }
        setTimeout(() => {
          this.testEquipment();
        }, 500);
      },
      /**
       * 邀请成员会议
       * @param   confId        会议室ID   string
       */
      inviteMember (confId) {
        let ExtNumList = [];
        let ExtNumMemList = ""
        let data = this.inviteListData;
        console.log("this.inviteListData");
        console.log(this.inviteListData);
        for (let i = 0; i < data.length; i++) {
          ExtNumList.push({ ExtNum: data[i].number + '' });
          ExtNumMemList+= data[i].name + ''+",";
        }
        ExtNumMemList = ExtNumMemList.substring(0,ExtNumMemList.length - 1);
        if(ExtNumList.length>0){
          let ret = ConferenceCtrl.ConferenceInvite(ExtNumList);
          if(ret<0){
            this.addInviteAudit(-1,ExtNumMemList);
          }else{
            this.addInviteAudit(0,ExtNumMemList);
          }
          console.log("this.conferenceMemData");
          console.log(this.conferenceMemData);
        }else{
          console.log("邀请列表为空");
        }
      },
      /**
       * 添加邀请成员会议日志
       * @param   type        int   成功=0  失败=-1
       */
      addInviteAudit(type,ExtNumMemList){
        let describtion="";
        let status="";
        if(type==0){
          describtion = this.userInfo.userName +"邀请了成员"+ExtNumMemList;
          status = "成功";
        }else{
          describtion = this.userInfo.userName +"邀请了成员"+ExtNumMemList;
          status = "失败";
        }
        let data = {
          dcId:this.userInfo.account,
          type:3,
          status:status,
          describe:describtion,
          fleetId:this.FleetId,
          detailType:20,
          remark:'',
        }
        this.GlobalFunc.GlaAddAudit(data);
      },
      /**
       * 选人组件关闭
       */
      handleChildClose () {
        this.showIntercomGroup = false;
      },
      /**
       * 选人组件提交确定后回调
       */
      childHandleConfirm (data) {
        let choosedDatas = data[0]; //已经选择的array数据
        let type = data[1]; //当前需要处理的type
        if (type) {
          switch (type) {
            case 'addConferenceMem':   //会议中邀请成员
              let ExtNumList = [];
              let ExtNumMemList = '';
              for (let i = 0; i < choosedDatas.length; i++) {
                ExtNumList.push({ ExtNum: choosedDatas[i].extnum + '' });
                ExtNumMemList += choosedDatas[i].name + '' + ',';
                let obj = {};
                obj.MemberName = choosedDatas[i].name;
                obj.ExtNumber = choosedDatas[i].extnum;
                obj.Status = 2;      //默认未接入
                obj.Mute = 0;
                for (let i = 0; i < this.conferenceMemData.length; i++) {
                  if (this.conferenceMemData[i].ExtNumber == obj.ExtNumber) {
                    this.$message(obj.MemberName + '已经存在');
                    return;
                  }
                }
                this.conferenceMemData.push(obj);      //更新成员列表信息，默认未连接和未禁言，后续根据回调更新
                this.monitorDivChange();
                this.showIntercomGroup = false;
              }
                ExtNumMemList = ExtNumMemList.substring(0, ExtNumMemList.length - 1);
                this.addConferenceMemdeal(ExtNumList,ExtNumMemList);
                break;
          }
        }
      }
      ,
      /**
       * 会议回调处理
       * @param
       */
      NewPageConference(Msg, Parm) {
        console.log('DispatchConference' + Msg);
        switch (Msg) {
          case 'ConferenceInvite':   //会议邀请成员
            console.log(Parm);
            break;
          case 'MakeConference':   //发起会议
            console.log(Parm);
            break;
          case 'ConferenceStatusNotify':   //会议状态改变
            this.changeConferenceStatus(Parm);
            break;
          case 'ConferenceEnterNotify':   //进入会议状态ConferenceInviteNotify
            this.enterConferenceStatus(Parm);
            console.log(Parm);
            break;
          case 'ConferenceInviteNotify':   //进入会议状态
            this.ConferenceInviteNotify(Parm);
            console.log(Parm);
            break;
        }
      },
      /**
       * 会议成员操作菜单处理
       * @param
       */
      handleConferenceRoomCommand (command, item) {
        switch (command) {
          case 'kickOut':                       //会议成员移除
            this.kickConferenceMem(item);
            break;
          case 'inviteJoinIn':                  //会议成员未连接时邀请
            this.conferenceSingleInvite(item);
            break;
          case 'setHolder':
            this.conferenceChangeHost(item);
            break;
          case 'setFocus':                     //会议设置成员聚焦
            this.conferenceSetMemFocus(item);
            break;
          case 'setFocusCancel':               //会议取消成员聚焦
            this.conferenceCancelMemFocus(item);
            break;
        }
      },
      /**
       * 枚举扬声器列表操作
       * @param
       */
      handleSpeakerChange(command){
        console.log(command);
        let ret = ConferenceCtrl.ConferenceSetSpeaker(command.label);
        this.UsingSpeaker = command;
      },
      /**
       * 枚举摄像头列表操作
       * @param
       */
      handleCameraChange(command){
        console.log(command);
        let CallId = parseInt(this.channelId);
        let ret = ConferenceCtrl.ConferenceSetCamera(command.label);
        this.UsingCamera = command;
      },
      /**
       * 枚举麦克风列表操作
       * @param
       */
      handleMicphoneChange(command){
        console.log(command);
        let ret = ConferenceCtrl.ConferenceSetMicphone(command.label);
        this.UsingMicphone = command;
      },
      /**
       * 会议成员未连接时邀请
       * @param  extnum
       */
      conferenceSingleInvite (item) {
        if (item.Status == ScsConstants.Conference_Connected) {
          this.$message('成员已连接，请不要重复邀请!');
        } else if (item.Status == ScsConstants.Conference_Connecting) {
          this.$message('成员正在连接中，请不要重复邀请');
        } else if (item.Status == ScsConstants.Conference_UnConnect) {
          let ExtNumList = [];
          let ExtNumMemList = "";
          let ConfId = this.currentConferenceId + '';
          ExtNumList.push({ ExtNum: item.ExtNumber + '' });
          ExtNumMemList+= item.MemberName + ''+",";
          ExtNumMemList = ExtNumMemList.substring(0,ExtNumMemList.length - 1);
          let ret = ConferenceCtrl.ConferenceInvite(ExtNumList);
          if(ret<0){
            this.addInviteAudit(-1,ExtNumMemList);
          }else{
            this.addInviteAudit(0,ExtNumMemList);
          }
        }
      },
      /**
       * 会议成员移除
       * @param   item.ExtNumber
       */
      kickConferenceMem (item) {
        if(this.HostExtNum!=this.userInfo.extnum&&item.ExtNumber!=this.userInfo.extnum){
          this.$message("只有主持人才能进行此操作");
          return;
        }
        if (item.Status == ScsConstants.Conference_Connected ||
          item.Status == ScsConstants.Conference_Connecting) {
          let ConfId = this.currentConferenceId + '';
          let describtion = "";
          let data ={};
          let ret = ConferenceCtrl.KickConferenceMem(item.ExtNumber);
          if (ret < 0) {
            describtion = this.userInfo.userName +"踢出分机号为"+item.ExtNumber+"的成员失败";
            data = {
              dcId:this.userInfo.account,
              type:3,
              status:'失败',
              describe:describtion,
              fleetId:this.FleetId,
              detailType:21,
              remark:'',
            }
            this.GlobalFunc.GlaAddAudit(data);
            console.log(ScsConstants.Parametor_Error);
          }else{
            describtion = this.userInfo.userName +"踢出分机号为"+item.ExtNumber+"的成员成功";
            data = {
              dcId:this.userInfo.account,
              type:3,
              status:'成功',
              describe:describtion,
              fleetId:this.FleetId,
              detailType:21,
              remark:'',
            }
            this.GlobalFunc.GlaAddAudit(data);
          }
        } else if (item.Status == ScsConstants.Conference_UnConnect) {
          this.$message('成员未连接，无法重复移除');
        }
      },
      /**
       * 会议设置主持人
       * @param
       */
      conferenceChangeHost(item){
        if(this.HostExtNum!=this.userInfo.extnum){
          this.$message("只有主持人才能进行此操作");
          return;
        }else{
          if(item.ExtNumber == this.userInfo.extnum){
            this.$message("已经是主持人，请勿重复设置");
            return;
          }else{
            if(item.Status == 1){
              ConferenceCtrl.ConferenceChangeHost(item.ExtNumber+'');
            }else{
              this.$message("该成员不在会议中，无法移交主持人");
            }
          }
        }
      },
      /**
       * 会议设置成员聚焦
       * @param
       */
      conferenceSetMemFocus (item) {
        if (item.Status == ScsConstants.Conference_Connected) {
          let ConfId = this.currentConferenceId + '';
          let ret = ConferenceCtrl.ConferenceFocus(item.ExtNumber+"");
          if (ret < 0) {
            console.log(ScsConstants.Parametor_Error);
          } else {
            let mem = this.conferenceMemData;
            for (let i = 0; i < mem.length; i++) {
              if (item.ExtNumber == mem[i].ExtNumber) {
                mem[i].Focus = 1;
              }
            }
          }
        } else {
          this.$message('请等待成员连接成功后操作');
        }
      },
      /**
       * 会议取消成员聚焦
       * @param
       */
      conferenceCancelMemFocus (item) {
        if (item.Status == ScsConstants.Conference_Connected) {
          let ConfId = this.currentConferenceId + '';
          let ret = ConferenceCtrl.ConferenceFocus('mux');
          if (ret < 0) {
            console.log(ScsConstants.Parametor_Error);
          } else {
            let mem = this.conferenceMemData;
            for (let i = 0; i < mem.length; i++) {
              if (item.ExtNumber == mem[i].ExtNumber) {
                mem[i].Focus = 0;
              }
            }
          }
        } else {
          this.$message('请等待成员连接成功后操作');
        }
      },
      /**
       * 会议设置成员禁言
       * @param
       */
      conferenceSetMemMute (item) {
        if(this.HostExtNum!=this.userInfo.extnum&&item.ExtNumber!=this.userInfo.extnum){
          this.$message("只有主持人才能进行此操作");
          return;
        }
        console.log(item);
        let ConfId = this.currentConferenceId + '';
        let extnum = item.ExtNumber + '';
        let Mute;
        if (item.Mute == 0) {
          Mute = 1;
        } else {
          Mute = 0;
        }
        let ret = ConferenceCtrl.MuteConferenceMem(extnum, Mute);
        if (ret < 0) {
          console.log(ScsConstants.Parametor_Error);
        }
      },

      /**
       * 枚举设备列表
       * @param
       */
      testEquipment(){
        console.log("testEquipment！!");
        let obj = DispatchOtherCtrl.LocalDevShow();
        console.log("room获取设备11");
        console.log(obj);
        if(!obj.UsingCamera){
          this.ConferenceCtrBtn2.cursor = "not-allowed";
        }else{
          this.ConferenceCtrBtn2.cursor = "pointer";
        }
        this.CameraList = obj.CameraList;
        this.UsingCamera = obj.UsingCamera;
        this.SpeakerList = obj.SpeakerList;
        this.UsingSpeaker = obj.UsingSpeaker;
        this.MicphoneList = obj.MicphoneList;
        this.UsingMicphone = obj.UsingMicphone;
        // this.DeviceList = obj.DeviceList;
      },
      /**
       * 会议设置全部禁言
       * @param      conferenceMuteAllStatus:0,会议内全部禁言状态   默认为0：0-可讲话状态；1-禁言状态
       */
      conferenceMuteAll () {
        if(this.HostExtNum!=this.userInfo.extnum){
          this.$message("只有主持人才能进行此操作");
          return;
        }
        let ConfId = this.currentConferenceId + '';
        let extnum = 'all';
        let Mute;
        if (this.conferenceMuteAllStatus == 0) {
          Mute = 1;
        } else if (this.conferenceMuteAllStatus == 1) {
          Mute = 0;
        }
        let ret = ConferenceCtrl.MuteConferenceMem(extnum, Mute);
        if (ret < 0) {
          console.log(ScsConstants.Parametor_Error);
        } else {
          if (this.conferenceMuteAllStatus == 0) {
            this.conferenceMuteAllStatus = 1;
          } else if (this.conferenceMuteAllStatus == 1) {
            this.conferenceMuteAllStatus = 0;
          }
        }
      },
      /**
       * 会议中邀请成员
       * @param   ExtNumList
       */
      addConferenceMem () {
        this.showIntercomGroup = true;
        this.type = 'addConferenceMem';
      },
      addConferenceMemdeal (ExtNumList,ExtNumMemList) {
        let confId = this.currentConferenceId + '';
        let ret = ConferenceCtrl.ConferenceInvite(ExtNumList);
        if(ret<0){
          this.addInviteAudit(-1,ExtNumMemList);
        }else{
          this.addInviteAudit(0,ExtNumMemList);
        }
      },
      /**
       * 屏幕共享
       * @param   screen
       * @param   callid   会议室号码   this.currentConferenceId
       */
      //TODO 待测试
      shareConferenceScreen(){
        if(this.ConferenceInfo.type =="Voice"){
          return;
        }
        let CallID =parseInt(this.channelId) ;
        let DevID = "";
        if(!this.ScreenShare){
          if(this.ScreenShareExtNum == ""){
            DevID = "screen"
            let ret = ConferenceCtrl.ConferenceSetCamera(DevID);
          }else{
            this.$message("当前有其他用户正在进行屏幕共享，请稍后再试");
            return;
          }
        }else {
          if (this.ScreenShareExtNum == this.userInfo.extnum) {
            if (this.conferenceCamera == 1) {
              if(this.UsingCamera){
                DevID = this.UsingCamera.label;
              }else{
                DevID = "none";
              }
            } else {
              DevID = "none";
            }
            let ret = ConferenceCtrl.ConferenceSetCamera(DevID);
          }
        }
      },
      /**
       * 会议麦克风开关
       * @param   CallID,        会议室ID   int
       * @param   Mute      0-讲话 1-禁麦    int
       */

      changeMicButton () {
        let confId = parseInt(this.currentConferenceId);
        let Mute = this.conferenceMic;      //会议室mic状态  0-关闭 1-打开 默认打开
        let ret = ConferenceCtrl.ConferenceSetMicButton(Mute);
        if (ret == -2) {
          console.log(ScsConstants.Parametor_Error);
        } else {
          if (this.conferenceMic == 0) {        //Mic打开成功改变图标
            this.conferenceMic = 1;           //会议室mic状态  0-关闭 1-打开 默认打开
          } else {                              //Mic关闭成功改变图标
            this.conferenceMic = 0;           //会议室mic状态  0-关闭 1-打开 默认打开
          }
        }
      },
      /**
       * 会议改变音量
       */
      changeVoice () {
        let CallID = parseInt(this.currentConferenceId);
        let Volume = parseInt(this.conferenceVoiceChange);
        console.log(this.conferenceVoiceChange);
        let ret = ConferenceCtrl.ConferenceSetvoice(Volume);
        if (ret < 0) {
          console.log(ScsConstants.Parametor_Error);
        }else{
          if(Volume>0){
            this.conferenceVoice = 1;
          }else if(Volume == 0){
            this.conferenceVoice = 0;
          }
        }
      },
      /**
       * 会议扬声器开关
       * @param   CallID       会议室ID   int
       * @param   Volume      音量   0-100   int
       */
      changeVoiceButton () {
        let confId = parseInt(this.currentConferenceId);
        let Volume;
        if (this.conferenceVoice == 1) {     //会议室扬声器状态  0-关闭 1-打开  默认打开
          Volume = 0;
        } else if (this.conferenceVoice == 0) {
          Volume = parseInt(this.conferenceVoiceChange);
        }
        let ret = ConferenceCtrl.ConferenceSetVoiceButton(confId, Volume);
        if (ret == -2||ret == -1) {
          console.log(ScsConstants.Parametor_Error);
        } else {
          if (this.conferenceVoice == 1) {        //扬声器关闭成功改变图标
            this.conferenceVoice = 0;
          } else if (this.conferenceVoice == 0) {  //扬声器打开成功改变图标
            this.conferenceVoice = 1;
          }
        }
      },
      /**
       * 会议摄像头开关
       * @param   ExtNumList
       */
      changeCameraButton () {
        if(this.ConferenceInfo.type =="Voice"){
          return;
        }
        if(!this.UsingCamera){
          this.$message("无可用设备，不支持开关摄像头");
          return;
        }
        if(this.ScreenShare){
          this.$message("屏幕共享时不支持摄像头操作");
          return;
        }
        let confId = parseInt(this.currentConferenceId);
        let type = parseInt(this.conferenceCamera);

        if (this.conferenceCamera == 0) {        //Mic打开成功改变图标
          ConferenceCtrl.ConferenceSetCamera(this.UsingCamera.label);     //打开摄像头
          this.conferenceCamera = 1;           //会议室mic状态  0-关闭 1-打开 默认打开
        } else {                              //Mic关闭成功改变图标
          ConferenceCtrl.ConferenceSetCamera("none");     //关闭摄像头
          this.conferenceCamera = 0;           //会议室mic状态  0-关闭 1-打开 默认打开
        }
      },
      /**
       * 退出会议
       * @param   confId        会议室ID   int
       */
      quitConference () {
        let confId = parseInt(this.currentConferenceId);
        let ret = ConferenceCtrl.ConferenceQuit();
        if (ret < 0) {
          console.log("离开会议失败");
        }
        DispatchOtherCtrl.WinSendMsg("Main","Refresh");
          if (this.userInfo.isBs && this.userInfo.isBs == 1) {
            console.log('网页关闭');
            window.location.href = 'about:blank';
            window.close();
          } else {
            console.log('客户端关闭');
            window.Win_Exit();
          }
      },
      /**
       * 最小化窗口会议
       */
      minimize(){
        if (this.userInfo.isBs && this.userInfo.isBs == 1) {
          console.log('网页会议最小化');
          this.$message('仅客户端支持最小化');
        } else {
          console.log('客户端会议最小化');
          try {
            window.Win_Minimized();
          } catch (e) {
            this.$message('仅最新客户端支持最小化，请更新客户端版本');
          }
        }
      },
      /**
       * 结束会议
       * @param   confId        会议室ID   string
       */
      closeConference () {
        if(this.HostExtNum!=this.userInfo.extnum){
          this.$message("只有主持人才能进行此操作");
          return;
        }
        let confId = this.currentConferenceId + '';
        let ret = ConferenceCtrl.ConferenceClose();
        if (ret < 0) {
          console.log(ScsConstants.Parametor_Error);
        } else {
          if(confId<1200){                           //视频会议处理
            // this.ConferenceInitDivArray[0].StopDisplay();
            // this.ConferenceInitDivArray[1].StopDisplay();
          }
        }
        DispatchOtherCtrl.WinSendMsg("Main","Refresh");
        if (this.userInfo.isBs && this.userInfo.isBs == 1) {
          console.log('网页关闭');
          window.location.href = 'about:blank';
          window.close();
        } else {
          console.log('客户端关闭');
          window.Win_Exit();
        }
      },
      /**
       * 添加会议成员到列表中
       * @param  parm.ConfID   string   会议室号码
       * @param  parm.Status   int      成员状态
       * @param  parm.ExtNum   string   成员分机号
       * @param  parm.MemName  string   成员名称
       * @param  parm.MemType  int      成员类型
       */
      addMemToList (parm) {
        let obj = {};
        obj.MemberName = parm.MemName;
        obj.ExtNumber = parm.ExtNum;
        obj.Status = parm.Status;
        obj.Mute = 0;
        obj.MemberType = parm.MemType;
        this.conferenceMemData.push(obj);
        this.monitorDivChange();
      },
      /**
       * 修改会议成员画面左下角信息
       * @param  Mute   int   是否讲话状态  0：讲话中  1：禁言中
       * @param  obj   成员信息
       */
      changeVideoDivInfo(obj,Mute){
        if(this.ConferenceInfo.type == "Voice"){
          //语音暂不处理
          return;
        }else if(this.ConferenceInfo.type == "Video"){
          for(var i =0;i<this.VideoMemberArray.length;i++){
            if(obj.ExtNum ==this.VideoMemberArray[i].extnum){
              this.VideoMemberArray[i].micStatus = Mute;
              return;
            }
          }
        }
      },
      /**
       * 添加会议成员画面到videolibarray
       * @param  obj.ExtNum   string   成员分机号
       * @param  obj.MemName   string   成员分机号
       * @param  status   int      状态     0：视频就绪   -1：视频结束  1：视频聚焦
       */
      setCanvasStatus (obj,status) {
        switch (status) {
          case -1:   //-1：视频结束
            for(var i =0;i<this.ConferenceInitDivArray.length;i++){
              if(this.ConferenceInitDivArray[i].isUse==1&&this.ConferenceInitDivArray[i].useExt ==obj.ExtNum){
                // let a=ConferenceCtrl.ConferenceWatch(obj.ExtNum+"");
                // if(a<0){
                //   console.log("参数错误");
                // }else{
                  this.ConferenceInitDivArray[i].isUse =0;
                  this.ConferenceInitDivArray[i].useExt ="";
                  //隐藏左下角信息
                this.VideoMemberArray[i].name = "";
                this.VideoMemberArray[i].extnum ="";
                this.VideoMemberArray[i].micStatus = obj.MemMute;
                this.VideoMemberArray[i].isShow = false;
                // }
                return;
              }
            }
            break;
          case 0:   //0：视频就绪
          for(var i =0;i<this.ConferenceInitDivArray.length;i++){
              if(!this.ConferenceInitDivArray[i].isUse||this.ConferenceInitDivArray[i].isUse==0){
                let a=ConferenceCtrl.ConferenceWatch(obj.ExtNum+"",this.ConferenceInitDivArray[i]);
                if(a<0){
                  console.log("参数错误");
                }else{
                  this.ConferenceInitDivArray[i].isUse =1;
                  this.ConferenceInitDivArray[i].useExt =obj.ExtNum;
                  //显示左下角信息
                  this.VideoMemberArray[i].name = obj.MemName;
                  this.VideoMemberArray[i].extnum =obj.ExtNum;
                  this.VideoMemberArray[i].micStatus = obj.MemMute;
                  this.VideoMemberArray[i].isShow = true;
                }
                return;
              }
          }
            break;
          case 1:   //1：视频聚焦
            //TODO 暂不不处理布局，待功能调通后再处理
            console.log("聚焦分机号为"+obj.ExtNum+"的成员!");
            break;
        }
      },
      /**
       * 会议状态改变
       * @param  obj.ConfID   string   会议室号码
       * @param  obj.Status   int      成员状态
       * @param  obj.ExtNum   string   成员分机号
       * @param  obj.MemName  string   成员名称
       * @param  obj.MemType  int      成员类型
       */
      changeConferenceStatus (obj) {
        if(obj.ConfID!=this.currentConferenceId){
          console.log("会议室不一致！");
          return;
        }
        console.log("changeConferenceStatus"+obj.Status);
        let that =this;
        let mem = this.conferenceMemData;
        let j;
        let isExist = false;
        for (let i = 0; i < mem.length; i++) {
          if (obj.ExtNum == mem[i].ExtNumber) {
            j = i;
            isExist = true;
          }
        }
        switch (obj.Status) {
          case ScsConstants.Conference_InfoGet:                 //会议信息可查询
            let ret = ConferenceCtrl.CurrentConferenceInfo();
            console.log("会议信息查询结果");
            console.log(ret);
            let OBJ ={};
            // this.conferenceMemData = ret.MemberList;
            for(var i=0;i<ret.MemberList.length;i++){
              OBJ={
                MemberName:ret.MemberList[i].MemName,
                ExtNumber:ret.MemberList[i].ExtNum,
                Mute:parseInt(ret.MemberList[i].MemMute),
                MemberType:parseInt(ret.MemberList[i].MemType),
                Status:parseInt(ret.MemberList[i].Status),
                MemVideo:parseInt(ret.MemberList[i].MemVideo),
              }
              if(OBJ.ExtNumber == ret.HostExtNum){
                 OBJ.isHold = 1;                    //1是主持人
              }else{
                OBJ.isHold = 0;                     //0不是主持人
              }
              this.conferenceMemData.push(OBJ);
              if(OBJ.MemVideo==1){
                let videoObj={
                  ExtNum:OBJ.ExtNumber,
                  MemName:OBJ.MemberName,
                }
                this.setCanvasStatus(videoObj,0);
              }
            }
            console.log(this.conferenceMemData);
            this.$nextTick(() =>{
              this.conferenceMemData =this.conferenceMemData;
              this.monitorDivChange();
            });
            if(this.micphoneOff ==1){
              ConferenceCtrl.ConferenceSetMicButton(1);     //关闭麦克风
            }
            if(!this.ConferenceInfo.msg){         //需要邀请人，自己创建的会议
              this.inviteMember(obj.ConfID + '');
            }
            this.HostExtNum = ret.HostExtNum;
            this.ScreenShareExtNum = ret.ScreenShare;
            break;
          case ScsConstants.Conference_KickOff:                 //成员移除
            break;
          case ScsConstants.Conference_Connected:               //成员已接入
            if (isExist) {                                              //直接修改成员状态
              mem[j].Status = obj.Status;
              mem[j].MemberType = obj.MemType;
            } else {                                              //添加成员到成员列表
              this.addMemToList(obj);
            }
                var describtion = obj.MemName +"加入了id为"+obj.ConfID+"的会议";
                var data = {
                  dcId:this.userInfo.account,
                  type:3,
                  status:'成功',
                  describe:describtion,
                  fleetId:this.FleetId,
                  detailType:19,
                  remark:'',
                }
                this.GlobalFunc.GlaAddAudit(data);
            break;
          case ScsConstants.Conference_Connecting:              //成员连接中
            if (isExist) {                                              //直接修改成员状态
              mem[j].Status = obj.Status;
              mem[j].MemberType = obj.MemType;
            } else {                                              //添加成员到成员列表
              this.addMemToList(obj);
            }
            break;
          case ScsConstants.Conference_UnConnect:               //成员未接入
            if (isExist) {                                              //直接修改成员状态
              mem[j].Status = obj.Status;
              mem[j].MemberType = obj.MemType;
              mem[j].Focus = 0;
            } else {                                              //添加成员到成员列表
              this.addMemToList(obj);
            }
            var index = -1;
            for (var i = 0; i < this.isTalkingMemObj.length; i++) {                                 //获取该成员在成员列表数组中的位置
              if (this.isTalkingMemObj[i].ExtNum == obj.ExtNum) {
                index = i;
              }
            }
            if(index>=0){
              this.isTalkingMemObj.splice(index, 1);                           //成员停止讲话时候，删除正在讲话列表中的该成员
              this.refreshTalkingMemName();
            }
            break;
          case ScsConstants.Conference_End:                     //会议结束
            var describtion = this.userInfo.userName +"结束了id为"+obj.ConfID+"的会议";
            var data = {
              dcId:this.userInfo.account,
              type:3,
              status:'成功',
              describe:describtion,
              fleetId:this.FleetId,
              detailType:18,
              remark:'',
            }
            this.GlobalFunc.GlaAddAudit(data);
            DispatchOtherCtrl.WinSendMsg("Main","Refresh");
            if (this.userInfo.isBs && this.userInfo.isBs == 1) {
              console.log('网页关闭');
              window.location.href = 'about:blank';
              window.close();
            } else {
              console.log('客户端关闭');
              window.Win_Exit();
            }
            break;
          case ScsConstants.Conference_Mute:                    //成员禁言
            if(obj.ExtNum==this.userInfo.extnum){
              this.conferenceMic = 0;
            }
            this.conferenceMemData[j].Mute = 1;
            console.log(this.conferenceMemData);
            this.changeVideoDivInfo(obj,1);
            break;
          case ScsConstants.Conference_CancelMute:              //成员取消禁言
            if(obj.ExtNum==this.userInfo.extnum){
              this.conferenceMic = 1;
            }
            this.conferenceMemData[j].Mute = 0;
            console.log(this.conferenceMemData);
            this.changeVideoDivInfo(obj,0);
            break;
          case ScsConstants.Conference_StartTalking:            //成员开始讲话
            var Obj ={
              ExtNum:obj.ExtNum,
              MemName:obj.MemName,
            }
            for(var i=0;i<this.isTalkingMemObj.length;i++){
              if(this.isTalkingMemObj[i].ExtNum == obj.ExtNum){
                return;
              }
            }
            this.isTalkingMemObj.push(Obj);               //增加正在讲话的成员
            this.refreshTalkingMemName();
            break;
          case ScsConstants.Conference_StopTalking:             //成员结束讲话
            var Obj ={
              ExtNum:obj.ExtNum,
              MemName:obj.MemName,
            }
            var index = -1;
            for (var i = 0; i < this.isTalkingMemObj.length; i++) {                                 //获取该成员在成员列表数组中的位置
              if (this.isTalkingMemObj[i].ExtNum == obj.ExtNum) {
                index = i;
              }
            }
            if(index>=0){
              this.isTalkingMemObj.splice(index, 1);                           //成员停止讲话时候，删除正在讲话列表中的该成员
              this.refreshTalkingMemName();
            }
            break;
          case ScsConstants.Conference_ChangeHost:                   //会议主持人变更
            this.$message("主持人被移至"+obj.MemName);
            this.HostExtNum = obj.ExtNum;
            for (let i = 0; i < this.conferenceMemData.length; i++) {
              if (obj.ExtNum == this.conferenceMemData[i].ExtNumber) {
                this.conferenceMemData[i].isHold =1;
              }else{
                this.conferenceMemData[i].isHold =0;
              }
            }
            break;
          case ScsConstants.Conference_VideoAlready:            //视频就绪
            console.log("视频就绪");
            console.log(obj);
            if(obj.ExtNum!=this.userInfo.extnum){              //本地画面已另作处理
              this.setCanvasStatus(obj,0);                 //处理画面
            }
            else{                                      //TODO  后续确认是否显示本地画面
              if(!this.UsingCamera){
                ConferenceCtrl.ConferenceSetCamera("none");     //关闭摄像头
              }else{
                if(this.cameraOff ==1){
                  ConferenceCtrl.ConferenceSetCamera("none");     //关闭摄像头
                }
              }
              this.ConferenceInitLocalDivArray[0].StartDisplay(-1);
              this.ConferenceInitLocalDivArray[0].isUse = 1;
              this.ConferenceInitLocalDivArray[0].useExt = this.userInfo.extnum;
            }
            break;
          case ScsConstants.Conference_VideoEnd:                //视频结束
            if(obj.ExtNum!==this.userInfo.extnum){              //本地画面已另作处理
              this.setCanvasStatus(obj,-1);                 //处理画面
            }
            else{                                      //TODO  后续确认是否显示本地画面
              this.ConferenceInitLocalDivArray[0].StopDisplay(-1);
              this.ConferenceInitLocalDivArray[0].isUse =0;
              this.ConferenceInitLocalDivArray[0].useExt ="";
            }
            break;
          // case ScsConstants.Conference_VideoFocus:              //视频聚焦
          //   if(obj.ExtNum!==this.userInfo.extnum){              //本地画面已另作处理
          //     this.setCanvasStatus(obj,1);                 //处理画面
          //   }
          //   break;
          case ScsConstants.Conference_StartScreenShare:              //屏幕共享开始
            if(obj.ExtNum==this.userInfo.extnum){                   //判断是否是本机开始共享
              this.ScreenShare = true;
              this.$message("屏幕共享成功");
            }
            this.ScreenShareExtNum = obj.ExtNum;
            break;
          case ScsConstants.Conference_StopScreenShare:              //屏幕共享结束
            if(obj.ExtNum==this.userInfo.extnum){                   //判断是否是本机结束共享
              this.ScreenShare = false;
              this.$message("取消屏幕共享成功");
            }
            this.ScreenShareExtNum = "";
            break;
        }
      },
      /**
       * 进入会议状态
       */
      enterConferenceStatus(obj){
        switch (obj.Status) {
          case 1:                 //连接中
            break;
          case 2:                 //连接成功
            var describtion = this.userInfo.userName +"发起id为"+obj.ConfID+"的会议成功";
            var data = {
              dcId:this.userInfo.account,
              type:3,
              status:'成功',
              describe:describtion,
              fleetId:this.FleetId,
              detailType:17,
              remark:'',
            }
            this.GlobalFunc.GlaAddAudit(data);
            break;
          case 3:                 //离开会议
            var describtion = this.userInfo.userName +"退出了id为"+obj.ConfID+"的会议";
            var data = {
              dcId:this.userInfo.account,
              type:3,
              status:'成功',
              describe:describtion,
              fleetId:this.FleetId,
              detailType:22,
              remark:'',
            }
            this.GlobalFunc.GlaAddAudit(data);
            if (this.userInfo.isBs && this.userInfo.isBs == 1) {
              console.log('网页关闭');
              window.location.href = 'about:blank';
              window.close();
            } else {
              console.log('客户端关闭');
              window.Win_Exit();
            }
            break;
          case 6:                 //会议邀请超时未接
            break;
          case 7:                 //连接失败
            var describtion = this.userInfo.userName +"发起id为"+obj.ConfID+"的会议失败";
            var data = {
              dcId:this.userInfo.account,
              type:3,
              status:'失败',
              describe:describtion,
              fleetId:this.FleetId,
              detailType:17,
              remark:'',
            }
            this.GlobalFunc.GlaAddAudit(data);
            break;
        }
      },
      /**
       * 收到会议邀请
       */
      ConferenceInviteNotify(obj){
        conferenceApi.queryUserStatus({          //查询调度台是否在会议室中  如果在则不能继续加入会议室
          ExtNumber: this.userInfo.extnum,
        }).then(res => {
          let UserStatus = res.obj.status;
          if(UserStatus ==1){         //1表示调度台在会议室中   2表示调度台不在会议中
            this.$message.warning("已处于会议室中，请勿重复加入");
            return;
          }else{
            this.showInComingConferenceScreen(this.currentConferenceId + '',this.ConferenceInfo.type);    //显示会议的界面
          }
        }).catch(err => {

        });
      },
    },
    };
</script>

<style src="@/assets/css/dispatchAndCall/dispatchAndCallCon.css"></style>
<style src="@/assets/css/home.css"></style>
<style src="@/assets/css/dispatch/dispatch.css"></style>
<style src="@/assets/css/dispatch/dispatchSystemBook.css"></style>
<style src="@/assets/css/intercom/intercom.css"></style>
<style src="@/assets/css/messages/messages.css"></style>
<style src="@/assets/css/conference/conference.scss" lang="scss"></style>
<style src="@/assets/css/conference/conferenceForVideo.css"></style>
<style src="@/assets/css/Agent/Agent.css"></style>
<style src="@/assets/css/DataManagement/DataManagement.css"></style>
<style src="@/assets/css/conference/conferenceForVideo1920and1280.css"></style>
<style scoped>
  /*【会议】会议界面，成员列表的文字图标要对齐，弹框里的按钮文字放大（可以支持）*/
  .conferenceIcon{
    width: 30px;
    height: 30px;
    vertical-align: middle;
  }.conferenceIconMore{
    width: 30px;
    height: 30px;
    vertical-align: middle;
  }
  /deep/ .el-dropdown-menu__item {
    font-size: 25px!important;
    height: 45px;
    line-height: 45px;
    min-width: 250px;
    margin: 5px auto!important;
  }

</style>
